package com.wunong.smart.bigdata.flink.data;

import lombok.Data;

import java.io.Serializable;

/**
 * @author created by zealot.zt
 */
@Data
public class AnalysisData implements Serializable {

    /**
     * 主键标识
     */
    private Long id;

    /**
     * @see SourceData#getId
     */
    private String sourceId;

    /**
     * 元数据
     */
    private SourceData sourceData;

    public static AnalysisData create(Long id, String sourceId) {
        AnalysisData analysisData = new AnalysisData();
        analysisData.setId(id);
        analysisData.setSourceId(sourceId);
        return analysisData;
    }

    public static AnalysisData create(String sourceId) {
        return create(System.currentTimeMillis(), sourceId);
    }

}